package com.nondo.rdp.finance.service.impl.collection;

import com.nondo.rdp.finance.domain.collection.CollList;
import com.nondo.rdp.finance.repository.collection.CollListRepository;
import com.nondo.rdp.finance.service.collection.CollListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Transactional
@Service
public class CollListServiceImpl implements CollListService {
    @Autowired
    CollListRepository collListRepository;

    @Override
    public List<CollList> findAll() {
        return this.collListRepository.findAll();
    }

    @Override
    public CollList findByAlbumId(int albumId) {
        return this.collListRepository.findByAlbumId(albumId);
    }

    @Override
    public CollList save(CollList collList) {
        return this.collListRepository.save(collList);
    }

    @Override
    public void update(CollList collList) {
        this.collListRepository.save(collList);
    }
}